package com.pzhu.acargid.paper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pzhu.acargid.domain.Paper;
import com.pzhu.acargid.until.Filters;
import com.pzhu.acargid.vo.PaperVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Lenovo
 * @description 针对表【paper】的数据库操作Service实现
 * @createDate 2023-08-13 15:48:26
 */
@Service
public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements PaperService {
    @Autowired
    private PaperMapper paperMapper;

    @Override
    public Page<PaperVO> getPaperPage(Integer userid, IPage<Paper> iPage, Integer docStatus, String model, String view, String order) {
        if ("time".equals(view))
            view = "jurnal_puttime";
        return paperMapper.getPaperPage(userid, iPage, docStatus, model, view, order);
    }

    @Override
    public List<PaperVO> filter(Integer userid, String type, Filters filters) {
        return paperMapper.filter(userid, type, filters);
    }
}




